<div class="task">
<?php include ('buttons.tpl'); ?>
</div>
<?php if ($error) { ?>
<div class="warning"><?php echo $error; ?></div>
<?php } ?>
<h2><?php echo $heading_title; ?></h2>
<div class="description"><?php echo $heading_description; ?></div>
<form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
  <div id="tabs">
	<ul>
	  <li><a href="#tabs-1"><?php echo $tab_general; ?></a></li>
	  <li><a href="#tabs-2"><?php echo $tab_data; ?></a></li>
	</ul>
	<div id="tabs-1">
      <?php foreach ($weight_classes as $weight_class) { ?>
      <fieldset>
        <legend><?php echo $weight_class['language']; ?></legend>
        <table>
          <tr>
            <td width="185"><span class="required">*</span> <?php echo $entry_title; ?></td>
            <td><input name="language[<?php echo $weight_class['language_id']; ?>][title]" value="<?php echo $weight_class['title']; ?>" />
              <?php if ($error_title) { ?>
              <span class="error"><?php echo $error_title; ?></span>
              <?php } ?></td>
          </tr>
          <tr>
            <td><span class="required">*</span> <?php echo $entry_unit; ?></td>
            <td><input name="language[<?php echo $weight_class['language_id']; ?>][unit]" value="<?php echo $weight_class['unit']; ?>" />
              <?php if ($error_unit) { ?>
              <span class="error"><?php echo $error_unit; ?></span>
              <?php } ?></td>
          </tr>
        </table>
      </fieldset>
      <?php } ?>
    </div>
    <div id="tabs-2">
      <table>
        <?php foreach ($weight_rules as $weight_rule) { ?>
        <tr>
          <td width="185"><?php echo $weight_rule['title']; ?></td>
          <td><input type="text" name="rule[<?php echo $weight_rule['to_id']; ?>]" value="<?php echo $weight_rule['rule']; ?>" /></td>
        </tr>
        <?php } ?>
      </table>
    </div>
  </div>
  <script type="text/javascript"><!--
	$(function() {
		$("#tabs").tabs();
	});
  //--></script>
</form>
